﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Vibes.Common.Interfaces;
using Microsoft.Practices.Unity;

namespace GuitarVibes.BL
{
    class UnityIocContainer : IIocContainer
    {
        private readonly IUnityContainer _container;

        public UnityIocContainer(IUnityContainer container)
        {
            if (container == null)
            {
                throw new ArgumentNullException("container");
            }
            _container = container;
        }

        public T Resolve<T>()
        {
            return _container.Resolve<T>();
        }

        public object Resolve(Type t)
        {
            return _container.Resolve(t);
        }
    }
}
